Namespace - LJCNetCommon
Parameters
text - The next append value.
addIndent - Indicates if the element can be indented.
allowNewLine - Indicates if a new line can be added.
Returns
The potentially indented, delimited and wrapped new text value.
Syntax
C# |
public String Item(String text, Boolean addIndent = True, Boolean allowNewLine = True)
|
Adds a delimiter if not the first list item
and adds a newline if line length is greater than CharLength.
Example
C# |
var tb = new TextBuilder();
for int index = 0; index < 14; index++)
{
var text = $"{index}**-";
tb.Item(text, NoIndent, NoNewLine);
}
r saveResult = tb.ToString();
result:
0**-, 1**-, 2**-, 3**-, 4**-, 5**-, 6**-, 7**-, 8**-, 9**-, 10**-, 11**-, 12**-, 13**-, 14**-
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.